package com.norteksoft.erm.model;

import java.util.Date;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * 访问历史（可以设置历史保留时间，月/季度/半年/年）
 * 
 * @author Jiffy
 * 
 */
public class AccessHistory extends BaseObject {

	private static final long serialVersionUID = -3487209582397109063L;

	private Long OID = new Long(-1);// OID

	private String userName;// 用户

	private Date loginDate;// 登录时间

	private Date logoutDate;// 注销时间

	private String location;// 登录地点

	public int hashCode() {
		return new HashCodeBuilder().append(OID).append(userName).append(
				loginDate).append(logoutDate).append(location).toHashCode();
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public Date getLoginDate() {
		return loginDate;
	}

	public void setLoginDate(Date loginDate) {
		this.loginDate = loginDate;
	}

	public Date getLogoutDate() {
		return logoutDate;
	}

	public void setLogoutDate(Date logoutDate) {
		this.logoutDate = logoutDate;
	}

	public Long getOID() {
		return OID;
	}

	public void setOID(Long oid) {
		OID = oid;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

}
